(function (factory) {
    if (typeof module === "object" && typeof module.exports === "object") {
        var v = factory(require, exports);
        if (v !== undefined) module.exports = v;
    }
    else if (typeof define === "function" && define.amd) {
        define(["require", "exports", "react"], factory);
    }
})(function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    const React = require("react");
    class BasePage extends React.Component {
        constructor(props) {
            super(props);
        }
        renderButtns() {
            return [];
        }
        render() {
            let buttons = this.renderButtns();
            let view = this.renderView();
            return React.createElement("div", null,
                React.createElement("ul", { className: "clearfix" },
                    React.createElement("button", { className: "btn btn-sm btn-primary pull-right", onClick: () => this.props.app.back() },
                        React.createElement("i", { className: "icon-reply" }),
                        React.createElement("span", null, "\u8FD4\u56DE")),
                    buttons.map((o, i) => React.createElement("li", { key: i, className: "pull-right" }, o))),
                React.createElement("hr", { style: { margin: 0, marginTop: -2 } }),
                view);
        }
    }
    exports.BasePage = BasePage;
});
